package com.weixin.common.core.exception;

/**
 * @version 1.0.0
 * @className: BaseException
 * @description: 微信服务顶级异常
 * @author: zhangjunfa
 * @date: 2023/5/27 15:03
 */
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 2996673399159642607L;

    /**
     * 错误码
     */
    private Integer code;

    /**
     * 错误消息
     */
    private String message;

    public BaseException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public BaseException(String message) {
        super(message);
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
